package com.mdroid.support.widgets;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.RelativeLayout;

import com.mdroid.support.widgets.DrawerLayout.Status;

/**
 * @author William.cheng
 */
public class DrawerFrontLayout extends RelativeLayout {
    private Status mStatus = Status.CENTER;

    public DrawerFrontLayout(Context context) {
        super(context);
    }

    public DrawerFrontLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public DrawerFrontLayout(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }
    
    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        if (mStatus != Status.CENTER) {
            return true;
        }
        return super.onInterceptTouchEvent(ev);
    }

    public Status getStatus() {
        return mStatus;
    }

    public void setStatus(Status status) {
        this.mStatus = status;
    }

}
